package com.lagou.edu.service.impl;

import com.lagou.edu.dao.TokenDao;
import com.lagou.edu.pojo.Token;
import com.lagou.edu.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TokenServiceImpl implements TokenService{
    @Autowired
    private TokenDao tokenDao;


    @Override
    public String saveToken(Token token) {
        tokenDao.save(token);
        return "yes";
    }

    @Override
    public Token findByEmail(String email) {
        return tokenDao.findByEmail(email);
    }
}
